<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
      #parent{
        width: 350px;
        height:300px;
      }
      #s1,#s2,#s3{
          width: 100px;
          height: 100px;
      }
      #s1{
        background-color: green;
        float: left;
      }
      #s2{
        background-color: blue;
        float: left;
        margin-left: 10px;
        margin-right: 10px;
      }
      #s3{
        background-color: yellow;
        float: left;
      }

  /*    浮动*/


  </style>
</head>
<body>


<div id="parent">
    <div id="s1">1</div>
    <div id="s2">2</div>
    <div id="s3">3</div>
</div>
</body>
</html>